<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <link rel="stylesheet" href="./index.css" />
    <script src="../node_modules/vue/dist/vue.global.js"></script>
    <script src="../node_modules/axios/dist/axios.min.js"></script>
    <script src="../node_modules/lodash/lodash.min.js"></script>
  </head>
  <body>
    <div class="container" id="app">

      <!-- 上面搜索部分 -->
      <div class="search">
        <div class="title">
          <p>综合</p>
          <p>定位</p>
        </div>
        <div class="types">
          <div class="type-list">
            <div class="radio" data-type="pay_type" data-value="10" @click="Check(10)" :class="activePaytype==10?'checked':''">本周免费</div>
            <div class="radio" data-type="pay_type" data-value="11" @click="Check(11)" :class="activePaytype==11?'checked':''">新手推荐</div>
          </div>
          <div class="type-list">
            <div class="radio" data-type="all" @click="Check()" :class="activePaytype==undefined?'checked':''">全部</div>
            <div class="radio" data-type="hero_type" data-value="3" @click="Check(3)" :class="activePaytype==3?'checked':''">坦克</div>
            <div class="radio" data-type="hero_type" data-value="1" @click="Check(1)" :class="activePaytype==1?'checked':''">战士</div>
            <div class="radio" data-type="hero_type" data-value="4" @click="Check(4)" :class="activePaytype==4?'checked':''">刺客</div>
            <div class="radio" data-type="hero_type" data-value="2" @click="Check(2)" :class="activePaytype==2?'checked':''">法师</div>
            <div class="radio" data-type="hero_type" data-value="5" @click="Check(5)" :class="activePaytype==5?'checked':''">射手</div>
            <div class="radio" data-type="hero_type" data-value="6" @click="Check(6)" :class="activePaytype==6?'checked':''">辅助</div>
          </div>
        </div>
        <div class="keyword">
          <div class="input">
            <input type="text" placeholder="请输入你要搜索的英雄名" v-model="inputStr"/>
          </div>
        </div>
      </div>

      <!-- 下面列表展示部分 -->
      <ul class="list">
        <li v-for="hero in filterHeros" :key="hero.ename">
          <a :href=`https://pvp.qq.com/web201605/herodetail/${hero.ename}.shtml` target="_blank">
                <img :src=`https://game.gtimg.cn/images/yxzj/img201606/heroimg/${hero.ename}/${hero.ename}.jpg`>
                <span v-html="hero.cname"></span>
          </a>
        </li>
      </ul>
    </div>

    <!-- 引入js文件 -->
    <script src="./index.js"></script>
  </body>
</html>
